package com.lxy.code.api;

import com.lxy.code.service.SendCodeByEmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 123
 * @date 2020/6/22 18:37
 * @description
 */
@RestController
public class SendCodeController {

    @Autowired
    private SendCodeByEmailService sendCodeByEmailService;

    @PostMapping("email/{email}/{code}")
    public Boolean sendCode(@PathVariable String email,@PathVariable String code){
        return sendCodeByEmailService.sendCode(email,code);
     }
}
